import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  { // 首页
    path: '/',
    name: 'index',
    component: () => import('../views/index/index.vue')
  },
  { // 商品
    path: '/goods',
    name: 'goods',
    component: () => import('../views/goods/goods.vue')
  },
  { // 商品编辑器
    path: '/goodsEditor',
    name: 'goodsEditor',
    component: () => import('../views/goodsEditor/goodsEditor.vue')
  },
  { // 双网营销
    path: '/marketing',
    name: 'marketing',
    component: () => import('../views/marketing/marketing.vue')
  },
  { // 双网营销编辑器
    path: '/marketingEditor',
    name: 'marketingEditor',
    component: () => import('../views/marketingEditor/marketingEditor.vue')
  }
]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
